     $(document).on('pagebeforeshow', '#options', function(){  
        setStyle("index");
        
        var el = document.getElementById("test");
        el.addEventListener("touchstart", click, false);
        FastClick.attach(document.getElementById('list'));
        
        /*window.addEventListener("touchstart", function(ev){
            //var xPos = ev.touches[0].pageX;
            //var id = ev.target.id;
            console.log('start');
            //console.log(ev.target+" "+xPos+" "+ev.target.id); // good
            //$('#'+id).trigger('click');
        });
        //this is win in speed
        $("#update").bind('touchstart',function() {
            console.log('touch');
            goToPage('pages/update/updates.html');
          });
        
        $("#chat").on("tap",function(){
            console.log('tap');
            goToPage('pages/update/updates.html');
        });*/
        
        document.addEventListener("deviceready", onDeviceReady, false);
    })
    
    function click(){   	 
    	 window.location = "pages/records/genres.html?types=ranobe";
     }
/*
    $(document).ready(function(){ 
        //var load = new Loader("file:///android_asset/www/pages/update/updates.html");
        //load.onLoad();
        onLoad();
        setStyle();
    });      
  
    
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // device APIs are available
*/
    
    // Register the event listener
    function onDeviceReady() {
        checkConnection();
    }
    
    //check internet connection
    function checkConnection() {
        var networkState = navigator.connection.type;
     
        var states = {};
        states[Connection.UNKNOWN]  = 'Unknown connection';
        states[Connection.ETHERNET] = 'Ethernet connection';
        states[Connection.WIFI]     = 'WiFi connection';
        states[Connection.CELL_2G]  = 'Cell 2G connection';
        states[Connection.CELL_3G]  = 'Cell 3G connection';
        states[Connection.CELL_4G]  = 'Cell 4G connection';
        states[Connection.NONE]     = 'No network connection';
     
        if(states[networkState] == states[Connection.NONE]) {
            alert('Нет подключения к интернету');
        } 
    }